#define _CRT_SECURE_NO_WARNINGS 1

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

class Solution {
public:
    string multiply(const string& num1, const string& num2) {
        int ratio = 0;
        string ret("0");
        int cut = num2.size() - 1;
        while (cut >= 0)
        {
            string aaa = _multiply(num1, num2[cut] - '0', ratio);
            ret = add(ret, aaa);
            ratio++;
            cut--;
        }
        return ret;
    }

    string _multiply(const string& num, int i, int ratio)
    {
        vector<char> ret;
        int cut = num.size() - 1;
        int count = 0;
        while (cut >= 0)
        {
            int sum = (num[cut] - '0') * i + count;
            count = sum / 10;
            sum %= 10;
            ret.push_back('0' + sum);
            cut--;
        }
        if (count)
            ret.push_back('0' + count);
        reverse(ret.begin(), ret.end());
        while (ratio)
        {
            ret.push_back('0');
            ratio--;
        }
        while (ret.size() > 1 && ret[0] == '0') {
            ret.erase(ret.begin());
        }
        return string(ret.begin(), ret.end());
    }
    string add(const string& num1, const string& num2)
    {
        vector<char> ret;
        int cut1 = num1.size() - 1;
        int cut2 = num2.size() - 1;
        int count = 0;
        while (cut1 >= 0 || cut2 >= 0)
        {
            int sum = 0;
            if (cut1 >= 0 && cut2 >= 0)
            {
                sum = num1[cut1] - '0' + num2[cut2] - '0' + count;
                cut1--;
                cut2--;
            }
            else if (cut1 >= 0) {
                sum = num1[cut1] - '0' + count;
                cut1--;

            }
            else {
                sum = num2[cut2] - '0' + count;
                cut2--;
            }
            if (sum >= 10) {
                sum -= 10;
                count = 1;
            }
            else {
                count = 0;
            }
            //if (sum != 0 || ret.empty() || ret.back() != 0)
            ret.push_back('0' + sum);
        }
        if (count)
            ret.push_back('0' + count);
        reverse(ret.begin(), ret.end());
        return string(ret.begin(), ret.end());
    }
};

int main()
{
    string a, b;/*

    a = "2925";
    b = "4787";*/
    cin >> a >> b;
    cout << Solution().multiply(a, b);
    //cout << Solution().add(a, b);
    return 0;
}